package com.guyaning.deyson_ec.ec.main.index;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.SimpleClickListener;
import com.guyaning.deyson_core.core.delegates.DeysonDelegate;
import com.guyaning.deyson_ec.ec.detail.GoodsDetailDelegate;

/**
 * Created by Administrator on 2018/6/26.
 */

public class IndexItemClickListener extends SimpleClickListener {

    private DeysonDelegate DELEGATE;

    public IndexItemClickListener(DeysonDelegate delegate) {
        DELEGATE = delegate;
    }

    public static SimpleClickListener create(DeysonDelegate delegate) {
        return new IndexItemClickListener(delegate);
    }

    @Override
    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {

        final GoodsDetailDelegate delegate = GoodsDetailDelegate.create();

        DELEGATE.start(delegate);
    }

    @Override
    public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) {

    }

    @Override
    public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {

    }

    @Override
    public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {

    }
}
